 package com.server.thread;
 

 import java.util.TimerTask;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class ThreadTask extends TimerTask
 {
   private static Logger logger = LoggerFactory.getLogger(ThreadTask.class);
   public ConnectionThread conn = null;
 
   public ThreadTask(ConnectionThread thread) 
   {
     this.conn = thread;
   }
 
   public void run()
   {
     
     if (this.conn == null) 
     {
    	 return;
     }
     if (!this.conn.isIsout())
     {
    	 this.conn.setIsout(true);
     }
     try 
     {
    	 this.conn.dispose();
     } catch (Exception e) 
     {
       e.printStackTrace();
       logger.error("run 运行时出错：{}" + e.getMessage());
     }
     this.conn = null;
   }
 }

